package com.chainyoung.trademarket.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author by Damon,  on 2018/8/6.
 */
public class Ad implements Parcelable{


    /**
     * id : 175
     * title : 关于“停止比特币交易平台”报道的统一回复
     * img :
     * addtime : 1505368838
     * from_table : article
     */

    private String id;//文章id
    private String title;//文章标题
    private String img;//文章配图
    private String addtime;//发布时间
    private String from_table;//文章类型 是来自article还是来自article表
    private String content;//
    private String type; //图片类型 app_banner
    private String type_name;

    private String url;//跳转url



    protected Ad(Parcel in) {
        id = in.readString();
        title = in.readString();
        img = in.readString();
        addtime = in.readString();
        from_table = in.readString();
        content = in.readString();
        type = in.readString();
        type_name = in.readString();
        url=in.readString();
    }

    public static final Creator<Ad> CREATOR = new Creator<Ad>() {
        @Override
        public Ad createFromParcel(Parcel in) {
            return new Ad(in);
        }

        @Override
        public Ad[] newArray(int size) {
            return new Ad[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getFrom_table() {
        return from_table;
    }

    public void setFrom_table(String from_table) {
        this.from_table = from_table;
    }




    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType_name() {
        return type_name;
    }

    public void setType_name(String type_name) {
        this.type_name = type_name;
    }


    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(title);
        dest.writeString(img);
        dest.writeString(addtime);
        dest.writeString(from_table);
        dest.writeString(content);
        dest.writeString(type);
        dest.writeString(type_name);
        dest.writeString(url);
    }


}
